const LYAnimation = (function (self) {
	
	/*
	 * 振动动画
	 * 
	 * */
	self.vibrate = function (div1) {
		console.log($(div1).css('left'))
//		var left = parseInt($(div).css('left'))
		var left = parseInt(div1.style.left)
		var range = 10
		
		$(div1).animate({
			left: '200px',
		},500)
		
		
		$(div1).animate({
			left: left + 2*range + 'px'
		},500)
		
		
		
	}
	
	
	
	/*
	 * animation动画
	 * */
	self.animation = function (dom, dic, duration) {
		$(dom).animate(dic,duration);
	}
	

	
	return self;
}(LYAnimation || {}))


 jQuery.fn.shake = function (intShakes /*Amount of shakes*/, intDistance /*Shake distance*/, intDuration /*Time duration*/) {
      this.each(function () {
          var jqNode = $(this);
          jqNode.css({ position: 'relative' });
          for (var x = 1; x <= intShakes; x++) {
              jqNode.animate({ left: (intDistance * -1) }, (((intDuration / intShakes) / 4)))
              .animate({ left: intDistance }, ((intDuration / intShakes) / 2))
              .animate({ left: 0 }, (((intDuration / intShakes) / 4)));
        }
    });
    return this;
 }